
public class Test {
    public static void main(String[] args) {
        MyTimer timer = new MyTimer();
        timer.schedule(new Runnable() {
            @Override
            public void run() {
                //时间到了之后要执行的代码
                System.out.println("hello MyTimer");
            }
        },3000);
    }
}
